

class Tclass():
    cls_val = 10
    def __init__(self):
        self.ins_val = 20

t = Tclass()
print(t.ins_val, t.cls_val)
Tclass.cls_val = 30
print(t.ins_val, t.cls_val, Tclass.cls_val)
t.cls_val = 40
print(t.ins_val, t.cls_val, Tclass.cls_val)




class Integer(object):
    def __init__(self, default, min, max):
        self.__default = default
        self.__min = min
        self.__max = max
    
    def __get__(self, instance, owner):
        return getattr(instance, )

    def __set__(self, instance, value):
        print('instance is {}, value is {}'.format(instance, value))
        if value < 0:
            raise ValueError('Negative value not allowed')
        instance.__dict__[self.name] = value

